const directives = { }
const files = require.context('./', false, /.js$/)
files.keys().forEach(key => {
  if (key === './index.js') return
  directives[key.replace(/(.\/|.js)/g, '')] = files(key).default
})

export default {
  install(app) {
    Object.keys(directives).forEach(key => {
      app.directive(key, directives[key])
    })
  }
}
